<?php echo $header; ?>
<div class="container make-bg">
<?php echo $content_top; ?>
<?php if($id >=39 && $id <=43)  {?>
           <ul class="breadcrumb">
                 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                <?php echo $breadcrumb['separator']; ?><li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
                <?php } ?>
            </ul>
            <div class="row">
                <div class="span12 post">
                    <h2 class="page-header"><?php echo $heading_title; ?></h2>
                    <div class="sidebar-line"><span></span></div>
                    
                        <ul id="portfolio-filter" class="nav nav-pills">
                          <li class="<?php if($id==39) { ?> active <?php } ?>" data-filter="all"><a href="<?php echo $link_all ?>">All</a></li>
                         <?php foreach($children_info  as $child) {?>
                          <li class="<?php if ($id == $child['category_id']) {?>active <?php } ?>" data-filter="<?php echo $child['name'] ?>">
                            <a href="<?php echo $child['href'] ?>"><?php echo $child['name'] ?></a></li>
                          <?php } ?>
                        </ul>
                    
                        <ul id="portfolio-items" class="thumbnails">
                        <?php foreach ($products as $product) { ?>
                          <li class="span3 clear" data-tags="">
                            <div data-stop="0" class="wdt-product">
                                <div class="wdt-products-wrapper">
                                    <div class="wdt-product active show">
                                       <?php if ($product['thumb']) { ?>
                                                <a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
                                            <?php } ?>
                                        <a href="<?php echo $product['href']; ?>">
                                        <div class="wdt-overlay zoom-portfolio">
                                        <i class="icon-link"></i>
                                        </div>
                                        </a>
                                        <a href="" rel="prettyPhoto" title="">
                                        <div class="wdt-overlay zoom-portfolio-title">
                                            <i class="icon-youtube-play"></i>
                                        </div>
                                        </a>
                                    </div>
                                </div>
                            </div>
                          </li>
                          <?php } ?>
                        </ul>
                        

                    <div class="pagination pagination-left">
                      
                    </div>        
                    
                </div>
               
            </div>
    
    
<?php } else { ?>

            <ul class="breadcrumb">
            	 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
			    <?php echo $breadcrumb['separator']; ?><li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
			    <?php } ?>
            </ul>
            
    		<div class="row">
            
			<div  class="<?php if($column_right !=null) { ?>span9 <?php } else { ?> span12 <?php } ?> post">
				<?php if ($products) { ?>
			
				<h2 class="page-header"><span><?php echo $heading_title; ?></span></h2>
				<div class="sidebar-line"><span></span></div>                    
				 <div class="row-fluid">
					<div class="span12">
                        <section id="wrap-cat">
                            <header class="wrap-header">
                                <div class="display">
                                <b>Display:</b>
                                	
									<a data-original-title="View List Style" style="<?php if(isset($_GET['type']) && $_GET['type']=="list") {?>opacity:0.5;<?php } ?>" data-placement="top" data-toggle="tooltip" class="list list-icon" href="<?php echo $link_list ?>">List View</a>
									<a data-original-title="View Grid Style" style="<?php if(isset($_GET['type']) && $_GET['type']=="grid") {?>opacity:0.5;<?php } ?>" data-placement="top" data-toggle="tooltip" class="grid grid-icon" href="<?php echo $link_grid ?>">Grid View</a>
                                </div>
							    <div class="limit"><b><?php echo $text_limit; ?></b>
							      <select onchange="location = this.value;">
							        <?php foreach ($limits as $limits) { ?>
							        <?php if ($limits['value'] == $limit) { ?>
							        <option value="<?php echo $limits['href']; ?>" selected="selected"><?php echo $limits['text']; ?></option>
							        <?php } else { ?>
							        <option value="<?php echo $limits['href']; ?>"><?php echo $limits['text']; ?></option>
							        <?php } ?>
							        <?php } ?>
							      </select>
							    </div>
							    <div class="sort"><b><?php echo $text_sort; ?></b>
							      <select onchange="location = this.value;">
							        <?php foreach ($sorts as $sorts) { ?>
							        <?php if ($sorts['value'] == $sort . '-' . $order) { ?>
							        <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
							        <?php } else { ?>
							        <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
							        <?php } ?>
							        <?php } ?>
							      </select>
							    </div>
                            </header>
                        </section>
					</div>
                </div>
                	<?php if(isset($_GET['type']) && $_GET['type'] =="list") {?>
                	<section id="product-list">
						
						 <?php foreach ($products as $product) { ?>
						<div class="row-fluid">
                            <div class="span3">
                               <div data-stop="0" class="wdt-product">
                                    <div class="wdt-products-wrapper">
                                        <div class="wdt-product active show">
                                         <?php if ($product['thumb']) { ?>
									     <a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
									      <?php } ?>
                               
                                            <h4><a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><?php echo $product['name']; ?></a></h4>
											<div class="wdt-overlay">
												<span class="amount"><?php echo $product['price']; ?></span>
											</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="span7 grid-desc">
                                <div class="grid-title-header">
                                
                                    <ul class="rating">
                                   	<?php for($i=1;$i<6; $i++) { ?>
                                    <?php if ($i <= $product['rating']) {?>
                                   	 	<li><i class="star-on"></i></li>
                                    <?php } else { ?>
                                    	<li><i class="star-off"></i></li>
                                    <?php } ?>
                                    <?php } ?>
                                    </ul>
                                    <a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><h4><?php echo $product['name']; ?></h4></a>
                                </div>
                                <p><?php echo $product['description']; ?></p>
                            </div>
                            <div class="span2 list-button">
                                <a class="btn btn-general" onclick="addToCart('<?php echo $product['product_id']; ?>');" title="<?php echo $button_cart; ?>"><span><i class="icon-shopping-cart"></i> <?php echo $button_cart; ?></span></a>
                                <div class="wish">
                                <a href="javascript:;" onclick="addToWishList('<?php echo $product['product_id']; ?>');" title="<?php echo $button_wishlist; ?>"><span><i class="icon-heart"></i> <?php echo $button_wishlist; ?></span></a>
                                </div>
                                <div class="watch">
                                <a href="<?php echo $product['href']; ?>#comment" title="<?php echo $button_reviews; ?>"><span><i class="icon-zoom-in"></i> <?php echo $button_reviews; ?></span></a>
                                </div>
                                
                            </div>
						</div>        
						<?php } ?>             
                    </section>
					<div style="clear:both;"></div>
                    <div class="pagination pagination-left">
                     <?php echo $pagination; ?>
                    </div>    
                       
                    <?php } else { ?>
                     <?php $d=0; foreach ($products as $product) { ?>
                     <?php if($d==0 || $d%4 ==0) { ?>
                     <div class="row-fluid">
                     <?php } ?>
                            <div class="span3">
                                <div class="wdt-product">
                                    <div class="wdt-products-wrapper">
                                        <div class="wdt-product active show">
                                            <?php if ($product['thumb']) { ?>
									     		<a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
									      	<?php } ?>
                               
                                            <h4><a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><?php echo $product['name']; ?></a></h4>
                                             <ul class="rating">
		                                   	<?php for($i=1;$i<6; $i++) { ?>
		                                    <?php if ($i <= $product['rating']) {?>
		                                   	 	<li><i class="star-on"></i></li>
		                                    <?php } else { ?>
		                                    	<li><i class="star-off"></i></li>
		                                    <?php } ?>
		                                    <?php } ?>
		                                    </ul>
                                                <div class="wdt-pricing">
                                                    <span class="amount"><?php echo $product['price']; ?></span>
                                                </div>
											<div class="wdt-cart">
												<div class="wdt-cart-bar">
													<a  onclick="addToCart('<?php echo $product['product_id']; ?>');"  href="javascript:;" title="<?php echo $product['name']; ?>"><i class="icon-shopping-cart"></i> Add to basket</a>
												</div>
											</div>
											<div class="wdt-overlay">
												<span class="amount"><?php echo $product['price']; ?></span>
											</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                    <?php if(($d+1)%4 ==0) { ?>
                    </div>
                    <?php } ?>
                    
                    <?php $d++; } ?>   
                    <div class="pagination pagination-left">
                     <?php echo $pagination; ?>
                    </div>     
                   
                    <?php } ?>            
                    <?php } ?>             
			</div><!-- end post span -->
      
                
			<div class="span3 sidebar">
            <?php echo $content_tg_user4; ?>
            <?php echo $column_right; ?>
                </div>
                </div>

<script type="text/javascript"><!--
$('#carousel55 ul').jcarousel55({
	vertical: false,
	visible: 5,
	scroll: 5
});
//--></script>        
<?php } ?>
<?php echo $content_bottom; ?>
</div>
<?php echo $footer; ?>

